package org.dromara.bclt.domain.vo;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.bclt.domain.DataRealtime;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 手环-指标数据-实时测量视图对象 bclt_data_realtime
 *
 * @author meiyoudaan448
 * @date 2024-10-21
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = DataRealtime.class)
public class DataRealtimeVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 实时数据id
     */
    @ExcelProperty(value = "实时数据id")
    private Long id;
    /**
     * 设备id
     */
    @ExcelProperty(value = "设备id")
    private Long deviceId;

    /**
     * 设备编号（MAC地址）
     */
    @ExcelProperty(value = "设备编号")
    @Translation(type = TransConstant.DEVICE_ID_TO_NUMBER, mapper = "deviceId")
    private String deviceNumber;

    /**
     * 用户名称
     */
    @ExcelProperty(value = "用户名称")
    @Translation(type = TransConstant.DEVICE_ID_TO_NAME, mapper = "deviceId")
    private String deviceName;

    /**
     * 任务id
     */
    @ExcelProperty(value = "任务id")
    private Long taskId;

    /**
     * 指标类型（心率、血氧、低压、高压）
     */
    @ExcelProperty(value = "指标类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "bclt_data_type")
    private String dataType;

    /**
     * 指标值
     */
    @ExcelProperty(value = "指标值")
    private Long dataValue;

    /**
     * 记录时间
     */
    @ExcelProperty(value = "记录时间")
    private Date recordTime;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 创建人
     */
    @ExcelProperty(value = "创建人")
    private Long createBy;

    /**
     * 创建人姓名
     */
    @ExcelProperty(value = "创建人")
    @Translation(type = TransConstant.USER_ID_TO_NAME, mapper = "createBy")
    private String createByName;

    /**
     * 更新时间
     */
    @ExcelProperty(value = "更新时间")
    private Date updateTime;


}
